package cn.buk.tms.dao;

import cn.buk.tms.entity.misc.ProductBought;

/**
 * Created with IntelliJ IDEA.
 * User: yfdai
 * Date: 14-4-21
 * Time: 下午11:51
 * To change this template use File | Settings | File Templates.
 */
public interface TransactionDao {

    /**
     * 购买产品交易
     * @param productBought
     * @param fee
     * @return
     *  100: 成功
     */
    int buyProductByPoints(ProductBought productBought, int fee, int userId);

    /**
     * 消费积分
     * @param enterpriseId
     * @param userId
     * @param amount
     * @param remark
     * @return
     */
    int consumePoints(int enterpriseId, int userId, int amount, String remark);

    /**
     * 现金账户购买
     * @param productBought
     * @param fee
     * @param userId
     * @return
     */
    int buyProductByCash(ProductBought productBought, int fee, int userId);
}
